package com.dnb.webmash.playmaker.shared;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Option implements IsSerializable {//TODO PREFS = OPTIONS clarify code
private ArrayList<String> myOptions;
private String myName;
private int setOption;
	
	public Option(){}
	//name of boolean option with default value
	public Option(String name, boolean b) {
		this.myName = name;
		this.myOptions = new ArrayList<String>(Arrays.asList("true", "false"));
		if (b) this.setOption = 0;
		else this.setOption = 1;
	}

	//name of option with list of possible values and default value to set... not set if def is -1
	public Option(String name, List<String> options, int def) {
		this.myName = name;
		this.myOptions = new ArrayList<String>(options);
		this.setOption = def;
	}

	public ArrayList<String> getMyOptions() {
		return myOptions;
	}

	public String getMyName() {
		return myName;
	}

	public int getSetOption() {
		return setOption;
	}

}
